package com.sky.mapper.admin;

import com.sky.pojo.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 口味持久层
 *
 * @Author mr.li
 * @Date 2025/7/8 11:56
 */
@Mapper
public interface DishFlavorMapper {


    /**
     * 新增菜品的口味信息
     * @param flavors
     */
    void save(List<DishFlavor> flavors);

    /**
     * 根据菜品id删除对应的口味
     * @param ids
     */
    void deleteDishByIds(@Param("ids") List<Long> ids);


    @Select("select * from dish_flavor where dish_id=#{id}")
    List<DishFlavor> getByDishId(@Param("id") Long id);
}
